# $Id$
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Gan Lu <rhythm.gan@gmail.com>

pkgname=scim
pkgver=1.4.17
pkgrel=1
pkgdesc='Input method user interface and development platform'
url='http://sourceforge.net/projects/scim/'
license=('LGPL')
arch=('i686' 'x86_64')
depends=('libltdl' 'gtk2')
optdepends=('qt4: qt4 immodule'
            'gtk3: gtk3 immodule')
makedepends=('intltool' 'qt4' 'gtk3')
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha1sums=('fd5a1078cb6c8d67f8bbf79969b8c5db033a0cda')

backup=('etc/scim/config' 'etc/scim/global')
install=install

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./bootstrap
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--with-qt4-moc=/usr/bin/moc-qt4 \
		--with-gtk-version=2 # no gtk3 support in scim-anthy

	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install
}
